pkfanonfandomcom-20200213-history
Pikifen/Object categories/Converter
Converters are objects that convert a Pikmin from one type to another. They're the Candypop Buds in the main series, whether the normal single-typed Candypop Buds, or the Queen Candypop Bud. To create a new type of converter, please follow the creating object types tutorial. Overview The converter object just sits there, and when a Pikmin is thrown inside, it is stored inside. After some seconds have passed, the object has been bumped against, or enough Pikmin have been stored at once, the converter closes, and spits out seeds of the new type. Some converters can also change their Pikmin type with time, cycling through them so the player can throw Pikmin at the right time to get the type of Pikmin they want. Converter type objects are hardcoded in the engine to sit there and wait for Pikmin to be thrown inside, store them, close, spit new seeds, open up, wither out, be bumped against, and change the output type with time. Attributes Besides the global object type attributes, a converter type requires the following attributes: *'available_pikmin_types': List of Pikmin types that this converter can produce, separated by semicolon. If there is only one type, the converter never changes, but if there are more, it will cycle through them with time, in the order you write here. In addition to those, you may also specify the following, although they are optional: *'auto_conversion_timeout': When a Pikmin is thrown in, the converter will close and convert after these many seconds have passed, if nothing else happened in the meantime. *'buffer_size': How many Pikmin the converter can have stored in its buffer before it's forced to close and convert them all. *'pikmin_per_conversion': For every one Pikmin inserted, how many Pikmin come out. *'same_type_counts_for_output': A converter can only handle so many Pikmin during its lifetime. If this is true, throwing a Pikmin of the same type as the output will count for this lifetime total. *'total_input_pikmin': After the converter has handled these many Pikmin, it closes, converts, and dies out. *'type_animation_suffixes': If this converter can output multiple types of Pikmin, this will indicate the suffix of the animations for every given type. This is a semicolon-separated list, and must be filled with the same amount and in the same order as available_pikmin_types. For example, if it outputs Red Pikmin and Yellow Pikmin, setting this to _red; _yellow means that all animations that end in _red (for instance, idling_red) will be used when the converter's current output is Red Pikmin. *'type_change_interval': If this converter can output multiple types of Pikmin, this is how long it takes for it to switch to the next type. Animations A converter type needs to have the following animations. Note that for every type of Pikmin it can output, you need another set of these animations, and each set needs to end with the suffix you specified in the type_animation_suffixes attribute. *'idling': Just idling. *'bumping': When it's been bumped against. *'closing': Closing. *'spitting': Spitting out the new seeds. *'opening': Opening back up. *'dying': Dying. Script A converter type's script cannot be changed. Object spawn script variables Besides the global spawn script variables, converter type objects do not read any specific script variables. Category:Pikifen